<template>
	<tui-datetime v-bind="$attrs" ref="datetimeRef" @confirm="change"></tui-datetime>
</template>

<script lang="ts" setup>
	import { reactive, ref } from 'vue'

	const datetimeRef = ref(null)
	let showParam = {}

	const emits = defineEmits(['confirm'])

	const change = (e : any) => {
		e.showParam = showParam
		emits('confirm', e)
	}

	defineExpose({
		show(param ?: any) {
			showParam = param
			datetimeRef.value.show()
		}
	})
</script>

<style>
</style>